package com.woniuxy.rbac.entity;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Auther: L
 */
@Getter
@Setter
public class Perm implements Serializable {
    private int id;
    private String name;
    private String code;
    private String link;
    private String icon;
    private int levelnum;
    private int parentid;
    private String type;
    private String status;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Perm perm = (Perm) o;
        return id == perm.id && Objects.equals(name, perm.name) && Objects.equals(code, perm.code) && Objects.equals(link, perm.link);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, code, link);
    }
}
